package com.example.mediademo.decode.extractor;

import android.media.MediaFormat;

import com.example.mediademo.decode.interfaces.IExtractor;

import java.nio.ByteBuffer;

public class VideoExtractor implements IExtractor {

    private String path;
    private MyExtractor mExtractor;

    public VideoExtractor(String filePath) {
        path = filePath;
        mExtractor = new MyExtractor(path);
    }


    @Override
    public MediaFormat getFormat() {
        return mExtractor.getVideoFormat();
    }

    @Override
    public int readBuffer(ByteBuffer buffer) {
        return mExtractor.readBuffer(buffer);
    }

    @Override
    public long getCurrentTimeStamp() {
        return mExtractor.getCurrentTimeStamp();
    }

    @Override
    public int getSampleFlag() {
        return mExtractor.getSampleFlag();
    }

    @Override
    public long seek(long pos) {
        return mExtractor.seek(pos);
    }

    @Override
    public void setStartPos(long pos) {
        mExtractor.setStartPos(pos);
    }

    @Override
    public void stop() {
        mExtractor.stop();
    }
}
